package com.qfedu.dao;

import com.qfedu.entity.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * 学生相关操作
 */
public interface StudentDao {

    @Update("update student_tb set name = #{name},age=#{age},sex=#{sex},height=#{height},birthday = #{birthday} where id = #{id}")
    int updateStudent(Student student);


    @Select("select * from student_tb")
    List<Student> findAllStudent();


    @Delete("delete from student_tb where id = #{id}")
    int deleteStudentById(int id);
}
